package net.showcal.api.request.mobile;

import com.alibaba.fastjson.JSON;
import net.showcal.api.ApiRuleException;
import net.showcal.api.XiniuRequest;
import net.showcal.api.domain.mobile.SexEnum;
import net.showcal.api.domain.mobile.UserTypeEnum;
import net.showcal.api.internal.util.XiniuHashMap;
import net.showcal.api.response.mobile.SysUserCreateResponse;

import java.util.Map;

    import java.util.Date;


/**
* <p/>
*
<pre>
 * ***************************************************************
 *  Copyright (c) 2014 –瘦咖网络科技有限公司
    *  Title: com.showcal.platform.helper.PlatformHelperImpl
    *  Description: platform Request
    *  @since
    *  @author kevin
    * ***************************************************************
 * </pre>
*/
public class SysUserCreateRequest implements XiniuRequest<SysUserCreateResponse> {
private XiniuHashMap udfParams = new XiniuHashMap();
/**
* 获取API名称
*/
@Override
public String getApiMethodName() {
return "platform.sysUser.create";
}

    /**
    * 用户帐号
    */
    private String account;
    /**
    * 用户名称
    */
    private String name;
    /**
    * 拼音
    */
    private String pinyin;
    /**
    * 拼音缩写
    */
    private String py;
    /**
    * 昵称/别名
    */
    private String nickName;
    /**
    * 移动电话
    */
    private String mobilePhone;
    /**
    * 关联的QQ号码
    */
    private String qq;
    /**
    * 关联的微信号
    */
    private String wechat;
    /**
    * 性别
    */
    private SexEnum sex;
    /**
    * 用户类型
    */
    private UserTypeEnum userType;
    /**
    * 头像ID
    */
    private String avatarId;
    /**
    * 是否禁言
    */
    private String isBanned;
    /**
    * 禁言时间
    */
    private Date bannedTime;
    /**
    * 用户密码
    */
    private String password;
    /**
    * 身高（厘米）
    */
    private Integer height;
    /**
    * 出生年月
    */
    private Date birthday;

    public String getAccount(){
    return account;
    }

    public void setAccount(String account){
    this.account=account;
    }

    public String getName(){
    return name;
    }

    public void setName(String name){
    this.name=name;
    }

    public String getPinyin(){
    return pinyin;
    }

    public void setPinyin(String pinyin){
    this.pinyin=pinyin;
    }

    public String getPy(){
    return py;
    }

    public void setPy(String py){
    this.py=py;
    }

    public String getNickName(){
    return nickName;
    }

    public void setNickName(String nickName){
    this.nickName=nickName;
    }

    public String getMobilePhone(){
    return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone){
    this.mobilePhone=mobilePhone;
    }

    public String getQq(){
    return qq;
    }

    public void setQq(String qq){
    this.qq=qq;
    }

    public String getWechat(){
    return wechat;
    }

    public void setWechat(String wechat){
    this.wechat=wechat;
    }

    public SexEnum getSex(){
    return sex;
    }

    public void setSex(SexEnum sex){
    this.sex=sex;
    }

    public UserTypeEnum getUserType(){
    return userType;
    }

    public void setUserType(UserTypeEnum userType){
    this.userType=userType;
    }

    public String getAvatarId(){
    return avatarId;
    }

    public void setAvatarId(String avatarId){
    this.avatarId=avatarId;
    }

    public String getIsBanned(){
    return isBanned;
    }

    public void setIsBanned(String isBanned){
    this.isBanned=isBanned;
    }

    public Date getBannedTime(){
    return bannedTime;
    }

    public void setBannedTime(Date bannedTime){
    this.bannedTime=bannedTime;
    }

    public String getPassword(){
    return password;
    }

    public void setPassword(String password){
    this.password=password;
    }

    public Integer getHeight(){
    return height;
    }

    public void setHeight(Integer height){
    this.height=height;
    }

    public Date getBirthday(){
    return birthday;
    }

    public void setBirthday(Date birthday){
    this.birthday=birthday;
    }

@Override
public Map
<String, String> getTextParams() {
XiniuHashMap txtParams = new XiniuHashMap();
        txtParams.put("account", this.account);
        txtParams.put("name", this.name);
        txtParams.put("pinyin", this.pinyin);
        txtParams.put("py", this.py);
        txtParams.put("nickName", this.nickName);
        txtParams.put("mobilePhone", this.mobilePhone);
        txtParams.put("qq", this.qq);
        txtParams.put("wechat", this.wechat);
    if(this.sex!=null){
        txtParams.put("sex",this.sex.toString());
    }
    if(this.userType!=null){
        txtParams.put("userType",this.userType.toString());
    }

        txtParams.put("avatarId", this.avatarId);
        txtParams.put("isBanned", this.isBanned);
        txtParams.put("bannedTime", this.bannedTime);
        txtParams.put("password", this.password);
        txtParams.put("height", this.height);
        txtParams.put("birthday", this.birthday);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}

@Override
public Long getTimestamp() {
return null;
}

@Override
public void setTimestamp(Long timestamp) {

}

@Override
public Class getResponseClass() {
return SysUserCreateResponse.class;
}

@Override
public void check() throws ApiRuleException {
}

@Override
public Map
<String, String> getHeaderMap() {
return null;
}

@Override
public void putOtherTextParam(String key, String value) {
this.udfParams.put(key,value);
}
}